package com.tools;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class StringLocalUtils {
    public static Boolean hasDigit(String content) {
        Boolean flag = false;
        Pattern p = Pattern.compile(".*\\d+.*");
        Matcher m = p.matcher(content);
        if (m.matches()) {
            flag = true;
        }
        return flag;
    }

    public static Boolean hasString(String content, String hasString) {
        Boolean flag = false;
        Pattern p = Pattern.compile(".*" + hasString + ".*");
        Matcher m = p.matcher(content);
        if (m.matches()) {
            flag = true;
        }
        return flag;
    }
}
